package com.wang.pool;

import com.wang.thread.ThreadRunnable;

import java.util.concurrent.Executor;
import java.util.concurrent.Executors;

public class ScheduledThreadPool {

    public static void main(String[] args) {
        Executor executor = Executors.newScheduledThreadPool(2);
        for(int i = 0;i<100;i++){
            executor.execute(new ThreadRunnable(i));
        }
        System.out.println("主线执行完毕");
    }
}
